using System;
using System.Collections.Generic;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{
    public enum GuildDefaultRanks : int
    {
        GR_GUILDMASTER = 0,
        GR_OFFICER = 1,
        //GR_VETERAN      = 2, -- not used anywhere and possible incorrect in modified rank list
        //GR_MEMBER       = 3,
        //GR_INITIATE     = 4, -- use Guild::GetLowestRank() instead for lowest rank
    };

    public enum GuildRankRights : int
    {
        GR_RIGHT_EMPTY = 0x00000040,
        GR_RIGHT_GCHATLISTEN = 0x00000041,
        GR_RIGHT_GCHATSPEAK = 0x00000042,
        GR_RIGHT_OFFCHATLISTEN = 0x00000044,
        GR_RIGHT_OFFCHATSPEAK = 0x00000048,
        GR_RIGHT_PROMOTE = 0x000000C0,
        GR_RIGHT_DEMOTE = 0x00000140,
        GR_RIGHT_INVITE = 0x00000050,
        GR_RIGHT_REMOVE = 0x00000060,
        GR_RIGHT_SETMOTD = 0x00001040,
        GR_RIGHT_EPNOTE = 0x00002040,
        GR_RIGHT_VIEWOFFNOTE = 0x00004040,
        GR_RIGHT_EOFFNOTE = 0x00008040,
        GR_RIGHT_MODIFY_GUILD_INFO = 0x00010040,
        GR_RIGHT_REPAIR_FROM_GUILD = 0x00020000,               // unused in 2.4.x?, Remove money withdraw capacity
        GR_RIGHT_WITHDRAW_REPAIR = 0x00040000,               // withdraw for repair
        GR_RIGHT_WITHDRAW_GOLD = 0x00080000,               // withdraw gold
        GR_RIGHT_ALL = 0x000FF1FF
    };

    public enum Typecommand : int
    {
        GUILD_CREATE_S = 0x00,
        GUILD_INVITE_S = 0x01,
        GUILD_QUIT_S = 0x03,
        GUILD_FOUNDER_S = 0x0E,
        GUILD_UNK1 = 0x10,
        GUILD_BANK_S = 0x15,
        GUILD_UNK3 = 0x16
    };

    public enum CommandErrors : int
    {
        GUILD_PLAYER_NO_MORE_IN_GUILD = 0x00,
        GUILD_INTERNAL = 0x01,
        GUILD_ALREADY_IN_GUILD = 0x02,
        ALREADY_IN_GUILD = 0x03,
        INVITED_TO_GUILD = 0x04,
        ALREADY_INVITED_TO_GUILD = 0x05,
        GUILD_NAME_INVALID = 0x06,
        GUILD_NAME_EXISTS = 0x07,
        GUILD_LEADER_LEAVE = 0x08,
        GUILD_PERMISSIONS = 0x08,
        GUILD_PLAYER_NOT_IN_GUILD = 0x09,
        GUILD_PLAYER_NOT_IN_GUILD_S = 0x0A,
        GUILD_PLAYER_NOT_FOUND = 0x0B,
        GUILD_NOT_ALLIED = 0x0C,
        GUILD_RANK_TOO_HIGH_S = 0x0D,
        GUILD_ALREADY_LOWEST_RANK_S = 0x0E,
        GUILD_TEMP_ERROR = 0x11,
        GUILD_RANK_IN_USE = 0x12,
        GUILD_IGNORE = 0x13,
        GUILD_ERR_UNK1 = 0x17,
        GUILD_WITHDRAW_TOO_MUCH = 0x18,
        GUILD_BANK_NO_MONEY = 0x19,
        GUILD_BANK_TAB_IS_FULL = 0x1B,
        GUILD_BANK_ITEM_NOT_FOUND = 0x1C
    };

    public enum GuildEvents : int
    {
        GE_PROMOTION = 0x00,
        GE_DEMOTION = 0x01,
        GE_MOTD = 0x02,
        GE_JOINED = 0x03,
        GE_LEFT = 0x04,
        GE_REMOVED = 0x05,
        GE_LEADER_IS = 0x06,
        GE_LEADER_CHANGED = 0x07,
        GE_DISBANDED = 0x08,
        GE_TABARDCHANGE = 0x09,
        GE_UNK1 = 0x0A,                             // string, string
        GE_UNK2 = 0x0B,
        GE_SIGNED_ON = 0x0C,
        GE_SIGNED_OFF = 0x0D,
        GE_UNK3 = 0x0E,
        GE_BANKTAB_PURCHASED = 0x0F,
        GE_UNK5 = 0x10,
        GE_UNK6 = 0x11,                             // string 0000000000002710 is 1 gold
        GE_UNK7 = 0x12
    };

    public enum PetitionTurns : int
    {
        PETITION_TURN_OK = 0,
        PETITION_TURN_ALREADY_IN_GUILD = 2,
        PETITION_TURN_NEED_MORE_SIGNATURES = 4,
    };

    public enum PetitionSigns : int
    {
        PETITION_SIGN_OK = 0,
        PETITION_SIGN_ALREADY_SIGNED = 1,
        PETITION_SIGN_ALREADY_IN_GUILD = 2,
        PETITION_SIGN_CANT_SIGN_OWN = 3,
        PETITION_SIGN_NOT_SERVER = 4,
    };

    public enum GuildBankRights : int
    {
        GUILD_BANK_RIGHT_VIEW_TAB = 0x01,
        GUILD_BANK_RIGHT_PUT_ITEM = 0x02,
        GUILD_BANK_RIGHT_UPDATE_TEXT = 0x04,

        GUILD_BANK_RIGHT_DEPOSIT_ITEM = GUILD_BANK_RIGHT_VIEW_TAB | GUILD_BANK_RIGHT_PUT_ITEM,
        GUILD_BANK_RIGHT_FULL = 0xFF,
    };

    public enum GuildBankLogEntries : int
    {
        GUILD_BANK_LOG_DEPOSIT_ITEM = 1,
        GUILD_BANK_LOG_WITHDRAW_ITEM = 2,
        GUILD_BANK_LOG_MOVE_ITEM = 3,
        GUILD_BANK_LOG_DEPOSIT_MONEY = 4,
        GUILD_BANK_LOG_WITHDRAW_MONEY = 5,
        GUILD_BANK_LOG_REPAIR_MONEY = 6,
        GUILD_BANK_LOG_MOVE_ITEM2 = 7,
    };

    public enum GuildEventLogEntryTypes : int
    {
        GUILD_EVENT_LOG_INVITE_PLAYER = 1,
        GUILD_EVENT_LOG_JOIN_GUILD = 2,
        GUILD_EVENT_LOG_PROMOTE_PLAYER = 3,
        GUILD_EVENT_LOG_DEMOTE_PLAYER = 4,
        GUILD_EVENT_LOG_UNINVITE_PLAYER = 5,
        GUILD_EVENT_LOG_LEAVE_GUILD = 6,
    };

    public struct GuildEventlogEntry  
    {
        UInt32 LogGuid;
        byte EventType;
        UInt32 PlayerGuid1;
        UInt32 PlayerGuid2;
        UInt32 NewRank;
        UInt64 TimeStamp;
    };

    public enum GuildEmblem : int
    {
        ERR_GUILDEMBLEM_SUCCESS = 0,
        ERR_GUILDEMBLEM_INVALID_TABARD_COLORS = 1,
        ERR_GUILDEMBLEM_NOGUILD = 2,
        ERR_GUILDEMBLEM_NOTGUILDMASTER = 3,
        ERR_GUILDEMBLEM_NOTENOUGHMONEY = 4,
        ERR_GUILDEMBLEM_INVALIDVENDOR = 5
    };


}
